/**
 * 用户
 */
export interface UserBO {
  userId: string
  userName: string
  gender: string
  mobilePhone: string
  email: string
  status: number
  createBy: string
  createTime: string
  updateBy: string
  updateTime: string
  orgCode: string
  orgFullName: string
  orgShortName: string
  fullNamePath: string
  orgList?: OrgBo[]
}

export interface DataTypes {
  id?: string
  code: string
  label?: string
  orgFullName?: string
  parentCode?: string
  isLeaf?: string | boolean
  isExtend?: string
  type?: string
  bingOrgCode?: string
  createBy?: string
  updateBy?: string
  createTime?: string
  updateTime?: string
  isUser?: boolean
  users?: DataTypes[]
  [key: string]: any
}

/**
 * 组织用户
 */
export interface OrgUserBO {
  userId: string
  label: string
  type: string
  avatarUrl: string
  code: string
  fullNamePath: string
  isLeaf: string
  isUser: string
  orgId: string
  orgCode: string
}

/**
 * 组织
 */
export interface OrgBo {
  code: string
  label: string
  extraInfo: string
  isExtend: string
  isLeaf: string
  is_default_org: string
  org_type: string
  parentCode: string
  status: string
  createBy: string
  createTime: string
  updateBy: string
  updateTime: string
}

export interface UserMapValue {
  userIds?: string
  sourceOrgCode?: string
  userId?: string
  orgCode?: string
}

export interface GetOrgTreeParams {
  orgCode: string // 组织编码
  isTree?: 1 | number // 是否返回树
  loadType?: number // 加载类型
  extendCondition?: [] // 扩展条件
  keyword?: string
}

export interface GetUserListParams {
  orgCode: string // 组织编码
  pageNum: number
  pageSize: number
  keyWord: string
}

export interface GetUserParams {
  userId?: string
  userIds?: string
  viewType?: string
  orgCode?: string
  status?: number
  extraInfo?: string
}

export interface TransferUsers {
  keepOriginal?: string
  targetOrgCode?: string
  status?: number
  items?: UserMapValue[]
}

export interface ExtendInfoBO {
  extraInfo: string
  orgCode: string
  userId: string
}

export interface UserInfoBO {
  current: number
  pages: number
  records: UserBO[]
  size: number
  total: number
}

export interface ResponseBo<T = any> {
  code: string
  message: string
  data: T
}
